package com.chaos.framework.model.constant;

public interface SecurityConstants {

    String AUTHORIZATION_KEY = "Authorization";
    String GRANT_TYPE_KEY = "grant_type";
    String REFRESH_TOKEN_KEY = "refresh_token";
    String CLIENT_ID_KEY = "client_id";


    String BASIC_PREFIX = "Basic ";


    String JWT_PREFIX = "Bearer ";
    String JWT_PAYLOAD_KEY = "payload";
    String JWT_JTI = "jti";
    String JWT_EXP = "exp";
    String JWT_AUTHORITIES_KEY = "authorities";
    String AUTHORITY_PREFIX = "role:";

    String AUTH_TOKEN_BLACKLIST_PREFIX = "auth:token:blacklist:";
    String AUTH_ROLE_PERMISSION_URL_KEY = "auth:role:permission:url:";
    String AUTH_ROLE_PERMISSION_BTN_KEY = "auth:role:permission:btn:";
    String AUTH_PHONE_CODE_SUFFIX = "auth:phone:code:";

    String ACTUATOR_MATCH = "/actuator/**";

    /**
     * admin api, 通过rbac授权（用于 saas 平台），加 admin 后缀
     * open api, 通过appId,appSecret授权，加 open 后缀
     * api, 通过token授权(userId)
     */
    String OPEN_API_PATTERN = "/*/**/*.open";
    String ADMIN_API_PATTERN = "/*/**/*.admin";


    String APP_ID = "appId";
    String APP_SECRET = "appSecret";


}
